getUrl();
function getUrl(){
	var cabinetName = Feng.getUrlParam("cabinetName");
    $.ajax({
		url : Feng.ctxPath + "/advert/selectMyAdvert",
		data : {
			"cabinetName" : cabinetName
		},
		type : 'post',
		dataType : 'json',
		success : function(data) {
			if(data.data != null){
				var urls = data.data;
				var myAdvertUrlHtml = '';
				for (i = 0; i < urls.length; i++) { 
					myAdvertUrlHtml += '<div><img src="'+urls[i].url+'" style="height: 100%;width: 100%"></div>';
				}
				myAdvertUrlHtml = "<div carousel-item>" + myAdvertUrlHtml + "</div>"
				$('#myAdvertUrl').append(myAdvertUrlHtml);
				layui .use( [ 'carousel', 'layer', 'form', 'admin', 'ax' ],function() {
					var $ = layui.jquery;
					var $ax = layui.ax;
					var form = layui.form;
					var admin = layui.admin;
					var layer = layui.layer;
					var carousel = layui.carousel;

					// 让当前iframe弹层高度适应
					admin.iframeAuto();

					$("#cabinetId").val(Feng.getUrlParam("cabinetId"));
					carousel.render({
					    elem: '#myAdvertUrl'
					    ,width: '100%' //设置容器宽度
					    ,height: '100%'
					    ,arrow: 'none' //始终显示箭头
					    //,anim: 'updown' //切换动画方式
					});
				});
			}
		},
		error : function(data) {
			 Feng.error("初始化失败!" + data.responseJSON.message + "!");
		}
    });
};
